home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 5
/
Gekikoh Dennoh Club Vol. 5 (Japan).7z
/
Gekikoh Dennoh Club Vol. 5 (Japan) (Track 01).bin
/
internet
/
webx
/
jpged26s.lzh
/
Load.s
< prev
next >
Wrap
Text File
|
1996-11-10
|
32KB
|
1,680 lines
*
* LOAD.S
*
*
*
include DOSCALL.MAC
include IOCSCALL.MAC
include JPEG.MAC
include work.inc
include keycode.inc
.text
*
*
.xref GetBlock 'GETBLOCK.S'
.xref write_nbytes 'GETBLOCK.S'
.xref Get_Header 'GETHEAD.S'
.xref Scroll 'SCROLL.S'
.xref clear_area 'JPEG.S'
.xref Memory_error 'ERROR.S'
.xref temp_name,temp_file 'MES.S'
.xref make_UQ_table 'MK_MUL_TBL.S'
.xref Write_error 'ERROR.S'
.xref int4c_bak 'MES.S'
.xref mouse_sub_bak 'MES.S'
.xref work_adrs 'MES.S'
.xref Disp_Pic_Info 'GETHEAD.S'
*
.xdef Load,inkey
.xdef init_vwork
.xdef getmem_1block_line
*
*
Load
*âwâbâ_ë≡É═
*----------------------------------
bsr Get_Header
cmp.b #2,Action(a6)
beq load_exit -H╡╠▀╝«▌ÄwÆΦ(âwâbâ_é╠é▌ò\Ī)
*ïtù╩Äqë╗├░╠▐┘ì∞ɼ
*---------------------
move.w #1,Qlevel(a6)
bsr SetQtable
*ôWèJùpé╠▄░╕┤╪▒èmò█
*----------------------------------
move.l free_adrs(a6),a2
move.l free_size(a6),d5
move.l #load_work_size-em_free_adrs,d1
adda.l d1,a2
sub.l d1,d5
bcs Memory_error
*ôWèJû╜ù▀▄░╕┤╪▒╗▓╜▐îvÄZ
*--------------------
move.l a2,GETP_adrs(a6)
move.w HE(a6),d1
sub.w HS(a6),d1
addq.w #1,d1
mulu.w #4*2,d1
add.l #12*2,d1
adda.l d1,a2
sub.l d1,d5
bcs Memory_error
move.l d1,GETP_size(a6)
*ïtù╩Äqë╗ŵÄZ├░╠▐┘ì∞ɼüò╥╙╪èmò█
*---------------------
bsr make_UQ_table
move.l a2,buff_adrs(a6)
move.l d5,buff_size(a6)
* âAâXâyâNâgé╠òΓÉ│
*-----------------------
btst.b #5,Sys_flag(a6)
bne adjust_Aspect_end âAâXâyâNâgé╠Ä⌐ô«òΓÉ│ù}ɺ╡╠▀╝«▌ÄwÆΦ
move.w DCC_bits(a6),d0
swap.w d0
move.w DCL_bits(a6),d0
cmp.l #17*65536+17,d0
bne adjust_Aspect_1
cmp.l #2*65536+3,Aspect(a6)
beq set_Aspect_3_2
adjust_Aspect_1
cmp.l #16*65536+16,d0
bne adjust_Aspect_end
cmp.w #512,Xline(a6)
bne adjust_Aspect_end
cmp.w #512,Yline(a6)
bne adjust_Aspect_end
set_Aspect_3_2
move.l #3*65536+2,Aspect(a6)
bset.b #7,Sys_flag(a6) *JPEG.X,JPGS.Xé┼ì∞éτéΩé╜ëµæ£é═RGBé╠ì┼æσÆlé¬252é╔é╡é⌐é╚éτé╚éó
*é╠é┼é╗é╠é╜é▀é╠òΓÉ│ùpâtâëâOüié┴é─Ä└ì█é═òΓÉ│é╡é─é╚éóüj
adjust_Aspect_end
*ëµû╩é╠èeÄφ▄░╕┤╪▒é≡Åëè·ë╗
*------------------------
bsr init_vwork
*╜╕█░┘ë┬ö\é╚╡╠▀╝«▌é⌐üH
*--------------------
btst.b #2,Sys_flag2(a6)
beq load50 éαé╞éµéΦüAâXâNâìü[âïé╖éΘâIâvâVâçâôÄwÆΦé┼é═é╚éó
btst.b #0,Sys_flag(a6)
bne @f ╖░æ╥é┐ùLéΦé╚é╠é┼╜╕█░┘ùLéΦ
btst.b #7,Sys_flag2(a6)
beq load50 ╖░æ╥é┐é╚é╡é┼üA╡░─╜╕█░┘éαé╚é╡é╚é╠é┼üA╜╕█░┘é╚é╡
@@
*ôWèJîπâXâNâìü[âïò\ĪÅoùêéΘé⌐üH
*----------------------
move.l picture_size(a6),d2
add.l #1024,d2 âtâ@âCâïô╟é▌ì₧é▌âoâbâtâ@ù\û±
cmp.l buff_size(a6),d2
bcc load20 ëµæ£æSæ╠é≡âüâéâèé╔ôWèJÅoùêé╚éó
*ÅoùêéΘ
*----------------------------
sub.l #1024,d2
move.l d2,Scroll_size(a6)
bra load11
*âXâNâìü[âïò\Īé┼âeâôâ|âëâèâtâ@âCâïé╔ôWèJ
*----------------------------------------
load20
btst.b #1,Sys_flag(a6)
beq load50 ├▌╬▀╫╪é╔ôWèJ╡╠▀╝«▌û│é╡é╚é╠é┼ôWèJîπ╜╕█░┘é╚é╡
*ëíéPâuâìâbâNâëâCâôò¬é╠âüâéâèé≡ĵéΘ
*---------------------------------
bsr getmem_1block_line
*âeâôâ|âëâèâtâ@âCâïé╠âpâXé≡ĵô╛
*--------------------------------
lea.l temp_path(a6),a0
tst.b (a0)
bne load21
move.l a0,-(sp)
clr.l -(sp)
pea.l temp_name(pc)
dos _GETENV
lea.l 12(sp),sp
tst.l d0
bpl load21
move.b '.',(a0) è┬ï½ò╧Éötempé¬É▌ÆΦé│éΩé─éóé╚éóÅΩìçé═
clr.b 1(a0) âJâîâôâgâfâBâîâNâgâèé╔âeâôâ|âëâèâtâ@âCâïé≡ì∞éΘ
*├▌╬▀╫╪╩▀╜é╔âtâ@âCâïû╝é≡Æ╟ë┴
*------------------------------
load21
tst.b (a0)+
bne load21
subq.w #1,a0
lea.l temp_file(pc),a1
load22
move.b (a1)+,(a0)+
bne load22
*âeâôâ|âëâèâtâ@âCâïé≡âIü[âvâô
*----------------------------
move.w #$20,-(sp)
pea.l temp_path(a6)
dos _MAKETMP
addq.w #6,sp
tst.l d0
bmi load50 âIü[âvâôÅoùêé╚éóé╠é┼ôWèJîπé╠âXâNâìü[âïò\Īé═é╡é╚éó
move.w d0,temp_handle(a6)
bset.b #2,Sys_flag(a6) âeâôâ|âëâèé╔ôWèJé╖éΘâtâëâO
*âXâNâìü[âïé┼é╠âZâôâ^âèâôâOò\Īé╠ÅÇö⌡
*------------------------------------
load11
clr.w XS(a6)
clr.w YS(a6)
move.w Xline(a6),d0
move.w VSXsize(a6),d1
move.w d0,XE(a6)
sub.w d0,d1
bls load12
addq.w #1,d1
lsr.w d1
subq.w #1,d0
add.w d1,d0
move.w d0,HE(a6)
move.w d1,HS(a6)
load12
move.w Yline(a6),d0
move.w VSYsize(a6),d1
move.w d0,YE(a6)
sub.w d0,d1
bls load13
addq.w #1,d1
lsr.w d1
subq.w #1,d0
add.w d1,d0
move.w d0,VE(a6)
move.w d1,VS(a6)
load13
bra load70
*ëµæ£ôWèJîπâXâNâìü[âïé╡é╚éóÅΩìç
*------------------------------
load50
*ëíéPâuâìâbâNâëâCâôò¬é╠âüâéâèé≡ĵéΘ
*-------------------------------
bsr getmem_1block_line
bclr.b #2,Sys_flag2(a6) âXâNâìü[âïé╡é╚éó
*-f╡╠▀╝«▌é╠Åêù¥
*------------------------
cmp.b #1,DispMod(a6)
bcs load53 -f0é▄é╜é═-f╡╠▀╝«▌é╚é╡
bne load51
*æSëµû╩ê°é½ëäé╬é╡
*----------------------
move.w HE(a6),d0
sub.w HS(a6),d0
addq.w #1,d0
move.w d0,Interval(a6)
move.w Xline(a6),Interval+2(a6)
move.w VE(a6),d0
sub.w VS(a6),d0
addq.w #1,d0
move.w d0,Interval+4(a6)
move.w Yline(a6),Interval+6(a6)
bra load53
*ÅcëíöΣé≡ò╧éªé╕é╔üAÅoùêéΘé╛é»æσé½é¡ò\Ī
*--------------------------
load51
move.w Xline(a6),d0 d0...Xline
move.w Yline(a6),d1 d1...Yline
move.w HE(a6),d2
sub.w HS(a6),d2
addq.w #1,d2 DX
move.w VE(a6),d3
sub.w VS(a6),d3
addq.w #1,d3 DY
move.w d2,d4
lsr.w #1,d4
add.w d2,d4 DX*3/2
* Xline * DY/Yline
*-------------------
load51_Y
move.l d0,d7
mulu.w d3,d7
divu.w d1,d7
* DX >= Xline * DY/Yline
*------------------------
cmp.w d7,d2
bcs load51_Y2
move.w d3,Interval(a6)
bra load51_Y_1
* DX*3/2 >= Xline * DY/Yline
*----------------------------
load51_Y2
move.w Aspect(a6),d6
cmp.w Aspect+2(a6),d6
bne load51_X
cmp.b #3,DispMod(a6)
beq load51_X -f3âIâvâVâçâôÄ₧é═âhâbâgöΣé╠ò╧ìXé═é╡é╚éó
cmp.w d7,d4
bcs load51_X
move.l #3*65536+2,Aspect(a6)
move.w d3,d6
add.w d6,d6
ext.l d6
divu.w #3,d6
move.w d6,Interval(a6)
load51_Y_1
move.w d3,Interval+4(a6)
move.w d1,Interval+2(a6)
move.w d1,Interval+6(a6)
bra load53
* DY >= Yline * DX*3/2/Xline
*----------------------------
load51_X
move.w Aspect(a6),d6
cmp.w Aspect+2(a6),d6
bne load51_X2
cmp.b #3,DispMod(a6)
beq load51_X2 -f3âIâvâVâçâôÄ₧é═âhâbâgöΣé╠ò╧ìXé═é╡é╚éó
move.w d4,d7
mulu.w d1,d7
divu.w d0,d7
cmp.w d7,d3
bcs load51_X2
move.l #3*65536+2,Aspect(a6)
move.w d2,Interval(a6)
move.w d4,Interval+4(a6)
bra load51_X_1
*
* Yline * DX/Xline
*
load51_X2
move.w d2,Interval(a6)
move.w d2,Interval+4(a6)
load51_X_1
move.w d0,Interval+2(a6)
move.w d0,Interval+6(a6)
load53
*ëíò√îⁿé╠ò\ĪèJÄné╞ÅIù╣ê╩Æué≡îvÄZ
*---------------------------------
move.w Xline(a6),d0
sub.w XS(a6),d0
mulu Interval(a6),d0
divu Interval+2(a6),d0 d0=ëµû╩Åπé┼é╠âhâbâgÉö
btst.b #3,Sys_flag2(a6)
bne load55 ê╩ÆuÄwÆΦéáéΦ
move.w VSXsize(a6),d1 âZâôâ^âèâôâOé╖éΘ
sub.w d0,d1
bcs load55
addq.w #1,d1
lsr.w d1
move.w d1,HS(a6)
*ëíò√îⁿé╠ò\ĪÅIù╣ê╩Æué¬ëµû╩ôαé╔Ä√é▄éΘéµéñé╔é╖éΘ
*---------------------------------------------
load55
add.w HS(a6),d0
subq.w #1,d0
move.w HE(a6),d1 d1=ëµû╩Åπé┼é╠ëíò√îⁿò\ĪÅIù╣ê╩Æu(âIâvâVâçâôÄwÆΦé┼ò╧ìXéáéΦ)
cmp.w d0,d1
bhi load63
move.w d1,d0
load63
move.w d0,HE(a6)
*Åcò√îⁿé╠ò\ĪèJÄné╞ÅIù╣ê╩Æué≡îvÄZ
*-----------------------------------
move.w Yline(a6),d0
sub.w YS(a6),d0
mulu Interval+4(a6),d0
divu Interval+6(a6),d0
btst.b #3,Sys_flag2(a6)
bne load64 ê╩ÆuÄwÆΦéáéΦ
move.w VSYsize(a6),d1 âZâôâ^âèâôâOé╖éΘ
sub.w d0,d1
bcs load64
addq.w #1,d1
lsr.w d1
move.w d1,VS(a6)
*Åcò√îⁿé╠ò\ĪÅIù╣ê╩Æué¬ëµû╩ôαé╔Ä√é▄éΘéµéñé╔é╖éΘ
*---------------------------------------------
load64
add.w VS(a6),d0
subq.w #1,d0
move.w VE(a6),d1
cmp.w d0,d1
bhi load66
move.w d1,d0
load66
move.w d0,VE(a6)
load70
*ë╝æzëµû╩âtâ@âCâïâoâbâtâ@èmò█
*--------------------------------
btst.b #5,Sys_flag2(a6)
beq load_get_VSF_buf_end ╡╠▀╝«▌é═ë╝æzëµû╩âtâ@âCâïÄwÆΦé┼é═é╚éó
bsr getmem_1line
move.w #1,-(sp)
pea.l VSname(a6)
dos _OPEN
addq.w #4+2,sp
tst.l d0
bpl load_get_VSF_buf_ok âtâ@âCâïé¬é╖é┼é╔æ╢ì▌é╡é─éóéΘ
move.w #$20,-(sp)
pea.l VSname(a6)
dos _CREATE
addq.w #4+2,sp
tst.l d0
bmi Write_error âtâ@âCâïé¬ì∞ɼÅoùêé╚éó
load_get_VSF_buf_ok
move.w d0,VShandle(a6)
load_get_VSF_buf_end
*ô╟é▌ì₧é▌âoâbâtâ@é╠èmò█
*--------------------------------
bsr getmem_file_buf
*âXü[âpâoâCâUü[âéü[âhé╓ê╚ì~
*--------------------------------
clr.l -(sp)
dos _SUPER
move.l d0,(sp)
bsr Get_vector
*âXâNâèü[âôâéü[âhÉ▌ÆΦ
*--------------------------------
btst.b #4,Sys_flag2(a6)
bne load83 ë╝æzëµû╩é╔ôWèJé╚é╠é┼ëµû╩Åëè·ë╗é═é╡é╚éó
btst.b #1,Sys_flag2(a6)
bne load80 -n╡╠▀╝«▌ÄwÆΦùLéΦüiÉ▌ÆΦé╡é╚éóüj
*î╗ì▌é╠╜╕╪░▌╙░─▐ö╗ÆΦ
*-----------------------------
moveq.l #-1,d1
iocs _CRTMOD
cmp.w #$0c,d0
beq Load76
*êßéñ╜╕╪░▌╙░─▐é╛é┴é╜
*-----------------------------
move.w #$0c,d1
iocs _CRTMOD
iocs _G_CLR_ON
bra load77
*ô»é╢╜╕╪░▌╙░─▐é╛é┴é╜
*-----------------------------
Load76
move.w #$10c,d1
iocs _CRTMOD
moveq.l #2,d1 text clrar
moveq.l #$2a,d0
trap #15
moveq.l #3,d1
iocs $91
ori.w #%0000_0000_0000_1111,$e8002a Graphic Fast Clear
move.w #2,$e80480
@@ btst.b #1,$e80480+1
bnz @b
move.w #%0000_0000_0010_1111,d1
iocs $93
load77
moveq.l #0,d2
moveq.l #0,d3
bsr set_HOME
*âhâbâgöΣé¬éPüFéPé╠ÅΩìçÉ│ò√î`âéü[âhé╔é╖éΘ
*-------------------------
load80
cmp.b #1,DispMod(a6)
beq load82 æSëµû╩é╔ê°é½ëäé╬é╡é╠ÅΩìçé═É│ò√î`âéü[âhé╔é╡é╚éó
move.w Aspect(a6),d0
cmp.w Aspect+2(a6),d0
bne load82 É│ò√î`é┼é═é╚éó
bsr Square
load82
*â}âEâXé╠Åëè·ë╗
*---------------------------
iocs _MS_INIT
moveq.l #0,d1
iocs _SKEY_MOD
iocs _MS_CUROF
moveq.l #$0000_0000,d1
move.l #$01ff_01ff,d2
iocs _MS_LIMIT
move.l #$0100_0100,d1
iocs _MS_CURST
*ü@âJü[â\âïé≡Å┴é╖
*-------------------
move.w #18,-(sp)
dos _CONCTRL
addq.w #2,sp
*ôWèJò\Ī
*---------------------------
load83
move.l sp,ErrorStackPoint(a6)
bsr GetBlock ëµæ£ôWèJ
tst.l d0
bmi load_end ï¡ÉºÅIù╣
move.b #1,DecodeStatus(a6)
bra Load84
.xdef LoadForceContinue
LoadForceContinue *ëµæ£é╔ê┘Åφé¬ùLé┴é─éαüAï¡ÉºÅIù╣é╡é╚éóÅΩìçüA
*GetBlocké╠Æåé⌐éτé▒é▒é╔ö≥é±é┼é¡éΘ
move.b #-1,DecodeStatus(a6)
Load84
clr.l ErrorStackPoint(a6)
*ëµæ£Åεò±ò\Īùvïüé¬éáéΘÅΩìçé═ò\Īé╖éΘüiÅ≤æ╘ìÇû┌ìXÉVé╠ê╫)
*-------------------------
btst.b #0,Sys_flag3(a6)
beq @f
bsr Disp_Pic_Info
@@
*ë╝æzëµû╩âtâ@âCâïé≡ò┬é╢éΘ
*----------------------------
btst.b #5,Sys_flag2(a6)
beq close_VSfile_end
*ë╝æzëµû╩âtâ@âCâïâTâCâYîvÄZ
*-----------------------------
move.w VSXsize(a6),d5
mulu.w VSYsize(a6),d5
add.l d5,d5
*î╗ì▌é╠ë╝æzëµû╩âtâ@âCâïâTâCâYé≡ĵô╛
*-----------------------------
move.w #2,-(sp)
clr.l -(sp)
move.w VShandle(a6),-(sp)
dos _SEEK
addq.w #2+4+2,sp
tst.l d0
bmi Write_error
sub.l d0,d5
bls close_VSfile
move.l d5,d0
move.l buff_size(a6),d5
cmp.l d0,d5
bls clear_VSfile
move.l d0,d5
clear_VSfile
move.l Scroll_Area(a6),a5
movem.l d0/d5/a5,-(sp) d5=clear memory size
bsr clear_area d0=clear file size
movem.l (sp)+,d0/d5/a5
exg.l d0,d5 d5=write file size
bsr write_nbytes d0=write memory size
close_VSfile
move.w VShandle(a6),-(sp)
dos _CLOSE
addq.w #2,sp
tst.l d0
bmi Write_error
close_VSfile_end
*âXâNâìü[âïò\Īë┬ö\é⌐
*----------------------------
btst.b #2,Sys_flag2(a6)
beq load90 âXâNâìü[âïò\Īé═é╡é╚éó
btst.b #2,Sys_flag(a6)
beq load87 ├▌╬▀╫╪é╔ôWèJé═é╡é─éóé╚éó
btst.b #3,Sys_flag(a6)
bne load90 âfâBâXâNâtâï
*ôWèJîπòsùpé╔é╚é┴é╜▄░╕┤╪▒é≡ë≡ò·é╡é─üA├▌╬▀╫╪é╔ôWèJé╡é╜ëµæ£é¬ô╟é▌ì₧é▀éΘé⌐üH
*------------------------------
movea.l free_adrs(a6),a0
move.l a0,GETP_adrs(a6)
adda.l GETP_size(a6),a0
move.l a0,Scroll_Area(a6)
move.l free_size(a6),d0
sub.l GETP_size(a6),d0
sub.l picture_size(a6),d0
bcs load87 ô╟é▌ì₧é▀é╚éó
*╥»╛░╝▐ô╟é▌ì₧é▌╩▐»╠º▄░╕ìXÉV
*------------------------------
cmp.l #1024,d0
bcs load87
move.l #65535,d1
cmp.l d1,d0
bls @f
move.l d1,d0
@@
move.l d0,buf_size(a6)
*ëµæ£æSæ╠é≡ô╟é▌ì₧é▐
*------------------------------
clr.w -(sp)
clr.l -(sp)
move.w temp_handle(a6),-(sp)
dos _SEEK âtâ@âCâïé╠ɵô¬é╓
move.l picture_size(a6),-(sp)
move.l Scroll_Area(a6),-(sp)
move.w temp_handle(a6),-(sp)
dos _READ
lea.l 8+10(sp),sp ëµæ£é≡æSòöô╟é▌ì₧é▐
bsr close_temp ├▌╬▀╫╪╠º▓┘é≡ìφÅ£
*âXâNâìü[âïò\Ī
*------------------------------
load87
bsr Scroll
bra load_end_adjust_home
*ôWèJò\Īîπé╠âLü[ôⁿù═æ╥é┐
*------------------------------
load90
btst.b #0,Sys_flag(a6)
beq load_end_adjust_home âLü[ôⁿù═æ╥é┐╡╠▀╝«▌é╚é╡
@@
dc.w $ffff
bsr inkey
tst.l d0
beq @b
load_end_adjust_home
bsr pic_home_adjust
*ò\ĪÅIù╣
*-------------------------------
load_end
*æ╝▒╠▀╪(G_VIEW)ùpé╔ëµû╩é╠Homeê╩Æué≡É▌ÆΦ
*-----------------------------
bsr set_HOME_for_apli
*├▌╬▀╫╪╠º▓┘ìφÅ£
*-------------------------------
bsr close_temp
*éαé╡╥»╛░╝▐é≡ò\Īé╡é─éóé╜éτÅ┴ïÄé╡é─ÅIù╣
*-------------------------------
@@
btst.b #0,Sys_flag3(a6)
beq @f
bsr inkey_undo
bra @b
@@
*â}âEâXÅëè·ë╗
*-------------------------------
btst.b #5,Sys_flag2(a6)
bne load_end_VS ë╝æzëµû╩é╔ôWèJé╡é╜ÅΩìçé═üAë╜éαé╡é╚éóé┼ÅIù╣
iocs _MS_INIT
moveq.l #-1,d1
iocs _SKEY_MOD
*âJü[â\âïò\Ī
*--------------------------------
move.w #17,-(sp)
dos _CONCTRL
addq.w #2,sp
*âåü[âUü[âéü[âhé╓ò£ïA
*-------------------------------
load_end_VS
bsr Restore_vector
clr.w -(sp)
DOS _KFLUSH
addq.l #2,sp
dos _SUPER
addq.w #4,sp
load_exit
dos _EXIT
*******************************************************************
*
* ëµû╩âTâCâYéµéΦüAèe▄░╕é≡Åëè·ë╗
*
*******************************************************************
init_vwork
* ëµæ£é╠Åc,ëíé╠╠▐█»╕Éö, ╠▐█»╕é╠Åcëíé╠─▐»─Éöé≡îvÄZ
*--------------------------------
move.w Xline(a6),d1
move.w Yline(a6),d2
moveq.l #8,d3
moveq.l #8,d4
addq.w #7,d1
addq.w #7,d2
lsr.w #3,d1
lsr.w #3,d2
move.b uvmode(a6),d0
subq.b #1,d0
beq @f
add.w d3,d3
addq.w #1,d1
bclr.l #0,d1
subq.b #1,d0
beq @f
add.w d4,d4
addq.w #1,d2
bclr.l #0,d2
@@
move.w d1,BlkX(a6) ëíò√îⁿé╠âuâìâbâNÉö
move.w d2,BlkY(a6) Åcò√îⁿé╠âuâìâbâNÉö
move.w d3,DeltaX(a6) 1╠▐█»╕ò╙éΦé╠ëíé╠─▐»─Éö
move.w d4,DeltaY(a6) 1╠▐█»╕ò╙éΦé╠Åcé╠─▐»─Éö
* ëµæ£é╠Ägùp╥╙╪ùeù╩é≡îvÄZ
*--------------------------------
lsl.w #3,d1
lsl.w #3,d2
mulu.w d1,d2
add.l d2,d2 d2=Ägùpâüâéâèùeù╩
move.l d2,picture_size(a6)
moveq.l #0,d1
move.w BlkX(a6),d1
lsl.l #3+1,d1
move.l d1,HScroll_size(a6)
lsl.l #3,d1
move.l d1,lx(a6)
move.l buff_adrs(a6),Scroll_Area(a6)
moveq.l #0,d0
move.w VSXsize(a6),d0
add.l d0,d0
move.l d0,VSXbyte(a6)
rts
*******************************************************************
*
* ëíéPâuâìâbâNâëâCâôò¬é╠âüâéâèé≡ĵéΘ
*
*******************************************************************
getmem_1block_line
move.w BlkX(a6),d0
mulu.w DeltaY(a6),d0
lsl.l #3+1,d0
cmp.l buff_size(a6),d0
bcc Memory_error èmò█Åoùêé╚éóé╠é┼âGâëü[
move.l d0,Scroll_size(a6)
bset.b #4,Sys_flag(a6)
rts
*******************************************************************
*
* ëµû╩ëíéPâëâCâôò¬é╠âüâéâèé≡ĵéΘ
*
*******************************************************************
.xdef getmem_1line
getmem_1line
movea.l Scroll_Area(a6),a0
adda.l Scroll_size(a6),a0
move.l a0,VSFile_buf_adrs(a6)
moveq.l #0,d0
move.w HE(a6),d0
sub.w HS(a6),d0
addq.w #1,d0
add.l d0,d0
cmp.l buff_size(a6),d0
bcc Memory_error èmò█Åoùêé╚éóé╠é┼âGâëü[
move.l d0,VSFile_buf_size(a6)
rts
*******************************************************************
*
* ╠º▓┘▒╕╛╜╩▐»╠ºé╠èmò█
*
*******************************************************************
.xdef getmem_file_buf
getmem_file_buf
movea.l Scroll_Area(a6),a0
adda.l Scroll_size(a6),a0
adda.l VSFile_buf_size(a6),a0
move.l a0,buf_adrs(a6)
move.l buff_size(a6),d0
sub.l Scroll_size(a6),d0
bls Memory_error
sub.l VSFile_buf_size(a6),d0
bls Memory_error
cmp.l #65535,d0
bls getmem_file_buf72
move.l #65535,d0
getmem_file_buf72
move.l d0,buf_size(a6)
rts
******************************************************************************
*
* INKEY
*
* ôⁿù═ é╚é╡
* Åoù═ d6,d7.....x,yê┌ô«ù╩
* d5........z(ègæσÅkżù╩)
* öjë≤ d0-d5,a0-a2
*
******************************************************************************
inkey
*â}âEâXâfü[â^ô╟é▌ì₧é▌
*-------------------------
*ÅIù╣é⌐
*-------------------
iocs _MS_GETDT
cmp.w #$ff_ff,d0
beq inkey_end_key2 ÅIù╣é┼éáéΘ
move.w MOUSE_TZ(a6),d5
*âJü[â\âïê╩Æuô╟é▌ì₧é▌
*-------------------
iocs _MS_CURGT
move.w d0,d7
swap.w d0
move.w d0,d6
sub.w #$100,d6
bcs inkey_ms_posx_sub
add.w MOUSE_TX(a6),d6
bcc inkey_ms_posy
move.w #$ffff,d6
bra inkey_ms_posy
inkey_ms_posx_sub
add.w MOUSE_TX(a6),d6
bcs inkey_ms_posy
moveq.l #0,d6
inkey_ms_posy
sub.w #$100,d7
bcs inkey_ms_posy_sub
add.w MOUSE_TY(a6),d7
bcc inkey_keyboard
move.w #$ffff,d7
bra inkey_keyboard
inkey_ms_posy_sub
add.w MOUSE_TY(a6),d7
bcs inkey_keyboard
moveq.l #0,d7
inkey_keyboard
move.l #$0100_0100,d1
iocs _MS_CURST
*âLü[ôⁿù═
*-------------------
inkey_loop
lea.l Key_jmp_tbl(pc),a2
inkey_loop1
move.w (a2)+,d0
beq inkey_special
lea.l Key_work(a6),a1
add.w d0,a1
bsr get_key_time
move.w (a2)+,d0
tst.w d1
beq inkey_loop1
bset.b #2,Sys_flag3(a6)
jsr inkey_loop(pc,d0.w)
bra inkey_loop1
inkey_special
move.w (a2)+,d0
beq inkey_end
lea.l Key_work(a6),a1
add.w d0,a1
bsr get_key_time
move.w (a2)+,d0
tst.w d1
beq inkey_special
jsr inkey_loop(pc,d0.w)
bra inkey_special
inkey_end_key
addq.l #4,sp
inkey_end_key2
moveq.l #-1,d0
rts
inkey_end
move.w Xline(a6),d0
cmp.w d0,d6
bls @f
move.w d0,d6
subq.w #1,d6
@@
move.w Yline(a6),d0
cmp.w d0,d7
bcs @f
move.w d0,d7
subq.w #1,d7
@@
move.w d6,MOUSE_TX(a6)
move.w d7,MOUSE_TY(a6)
moveq.l #0,d0
rts
inkey_up
sub.w d1,d7
bcc @f
moveq.l #0,d7
@@: rts
inkey_down
add.w d1,d7
bcc @f
moveq.l #-1,d7
@@: rts
inkey_left
sub.w d1,d6
bcc @f
moveq.l #0,d6
@@: rts
inkey_right
add.w d1,d6
bcc @f
moveq.l #-1,d6
@@: rts
inkey_zoomin
add.w d1,d5
bcs 1f
move.w Maxline(a6),d0
* add.w #512-1,d0
add.w d0,d0
subq.w #1,d0
*
cmp.w d0,d5
bls 2f
1 move.w d0,d5
2 rts
inkey_zoomout
sub.w d1,d5
bls 1f
cmp.w #1,d5
bhi 2f
1
moveq.l #1,d5
2
moveq.l #0,d0
move.w Maxline(a6),d0
cmp.w d0,d5
bhi inkey_zoomout_end
lsr.l #16-9,d0
addq.w #1,d0
cmp.w d0,d5
bcc inkey_zoomout_end
move.w d0,d5
inkey_zoomout_end
rts
*-----------------------------
*ò\Īê╩ÆuüAò\Īö{ùªé≡├▐╠½┘─é╓
*-----------------------------
inkey_home
bclr.b #2,Sys_flag3(a6)
bnz inkey_home_first
move.b Home_key_time(a6),d0
tst.b d0
bne inkey_home_next
*ì┼Åëé╠Home╖░é¬ëƒé│éΩé╜ÅΩìçé╠Åêù¥
*-------------------------
inkey_home_first
move.w Maxline(a6),d5
move.w Xline(a6),d6
move.w Yline(a6),d7
lsr.w d6
lsr.w d7
bra inkey_home_end
*ô±ë±û┌é╠Home╖░é¬ëƒé│éΩé╜ÅΩìçé╠Åêù¥
*ü@ëµæ£é≡ëµû╩é╠╗▓╜▐é╔ìçéφé╣éΘ
*-------------------------
inkey_home_next
*ò\Īö{ùªé≡╖░▄░╕é╞ô»é╢î`Ä«é╔ò╧è╖
*----------------------
move.w Maxline(a6),d5
move.w #512,d0
cmp.w d0,d5
bcs 1f ègæσò√îⁿé╓
*Åkż
*---------------------
move.w d0,d5
bra 2f
*ègæσ
*----------------------
1
move.w d0,d5
2
*ëµæ£é╠╬░╤ê╩Æué≡îvÄZ
*----------------------
move.w Xline(a6),d6
move.w Yline(a6),d7
lsr.w d6
lsr.w d7
inkey_home_end
move.b Home_key_time(a6),d0
addq.b #1,d0
cmp.b #2,d0
bcs @f
moveq.l #0,d0
@@
move.b d0,Home_key_time(a6)
rts
*----------------------
*ëµæ£Åεò±é≡ò\Ī
*----------------------
inkey_undo
btst.b #4,Sys_flag2(a6)
bnz inkey_undo_end
btst.b #0,Sys_flag3(a6)
beq inkey_undo_disp1
bchg.b #1,Sys_flag3(a6)
bne inkey_undo_disp2
*ò\ĪÆåé┼üAö╝èKÆ▓é╔É▌ÆΦ
*----------------------------
move.w #$1b3f,$e82600
rts
*ò\Ī
*----------------------------
inkey_undo_disp1
bset.b #0,Sys_flag3(a6)
bsr cls_text
bra Disp_Pic_Info
*ò\Īë≡Å£
*----------------------------
inkey_undo_disp2
bclr.b #0,Sys_flag3(a6)
bclr.b #1,Sys_flag3(a6)
bsr cls_text
move.w #$003f,$e82600
inkey_undo_end
rts
get_key_time
move.w 4(a1),d1
clr.w 4(a1)
move.w (a1),d0
cmp.w #$ffff,d0
beq get_key_time_end
move.w $9cc.w,d2
sub.w d2,d0
bcc @f ╡░╩▐░╠█░é╡é─éóé╚éó
add.w $9ca.w,d0
@@
add.w d0,d0
cmp.w #$fffe,2(a1)
bhi get_key_time_1 ╪╦▀░─Æå
beq @f ╪╦▀░─èJÄnæ╥é┐Æå
move.w #$fffe,2(a1) ì┼Åëé╠key oné╠Åêù¥é≡é╡é╜é▒é╞é≡â}ü[âN
moveq.l #1,d0
bra get_key_time_2
@@
sub.w #20*2,d0
bls get_key_time_end é▄é╛╪╦▀░─èJÄné┼é═é╚éó
move.w #$ffff,2(a1) ╪╦▀░─Æåé┼éáéΘÄûé≡â}ü[âN
get_key_time_1
move.w d2,(a1)
*ê┌ô«ìéæ¼ë╗╖░┴¬»╕
*------------------------------
get_key_time_2
bsr chk_key_fast
add.w d0,d1
get_key_time_end
rts
Key_jmp_tbl
*Æ╩Åφé╠╖░Åêù¥
*-------------------------
.dc.w K_Up*6,inkey_up-inkey_loop
.dc.w K_T2*6,inkey_up-inkey_loop
.dc.w K_Down*6,inkey_down-inkey_loop
.dc.w K_T8*6,inkey_down-inkey_loop
.dc.w K_Right*6,inkey_right-inkey_loop
.dc.w K_T4*6,inkey_right-inkey_loop
.dc.w K_Left*6,inkey_left-inkey_loop
.dc.w K_T6*6,inkey_left-inkey_loop
.dc.w K_PgUp*6,inkey_zoomout-inkey_loop
.dc.w K_PgDn*6,inkey_zoomin-inkey_loop
.dc.w K_Esc*6,inkey_end_key-inkey_loop
.dc.w K_BkSp*6,inkey_end_key-inkey_loop
.dc.w K_Enter*6,inkey_end_key-inkey_loop
.dc.w K_Space*6,inkey_end_key-inkey_loop
.dc.w K_Undo*6,inkey_undo-inkey_loop
.dc.w $80*6,inkey_zoomout-inkey_loop
.dc.w $81*6,inkey_zoomin-inkey_loop
.dc.w 0
*é┐éσé┴é╞ô┴ò╩é╚╖░Åêù¥
*-------------------------
.dc.w K_Home*6,inkey_home-inkey_loop
.dc.w 0
***********************
*
* ê┌ô«ìéæ¼ë╗âLü[â`âFâbâN
*
* ôⁿù═ d0 ê┌ô«ù╩
* Åoù═ d0 ê┌ô«ù╩
* öjë≤ û│é╡
***********************
.xdef chk_key_fast
chk_key_fast
cmp.w #$ffff,Key_work+K_Ctrl*6(a6)
bne 3f Ctrlô»Ä₧ëƒé╡
cmp.w #$ffff,Key_work+K_Opt1*6(a6)
bne 3f Opt.1ô»Ä₧ëƒé╡
btst.b #3,Sys_flag3(a6)
bne 1f TV ctrl╖░éαê┌ô«ìéæ¼ë╗╖░é╞é╡é─ï¡ÉºÄgùp
btst.b #0,$ed0027
beq 4f Opt.2é═TV ctrl
bra 2f Opt.2é═normal
1:
cmp.w #$ffff,Key_work+K_Shift*6(a6)
bne 3f Shiftô»Ä₧ëƒé╡
2:
cmp.w #$ffff,Key_work+K_Opt2*6(a6)
bne 3f Opt.2ô»Ä₧ëƒé╡
bra 4f
3:
lsl.w #2,d0
4:
rts
******************************************************************************
*
* âxâNâ^ĵô╛
*
******************************************************************************
Get_vector
*Ctrl-Cé╞âvâìâZâXé╠âAâ{ü[âgâxâNâ^é≡ò╧ìXé╖éΘ
*--------------------------------------------
pea.l abort_process(pc)
move.w #_CTRLVC,-(sp)
DOS _INTVCS
addq.w #6,sp
pea.l abort_process(pc)
move.w #_ERRJVC,-(sp)
DOS _INTVCS
addq.w #6,sp
*KEY BUFFER FULLèäéΦì₧é▌é╠âxâNâ^é≡ŵé┴ĵéΘ
*--------------------------------------------
*Key_worké≡Åëè·ë╗
*--------------------------------
lea.l Key_work(a6),a0
move.l #$ffff0000,d0
move.w #128+2-1,d1
@@
move.l d0,(a0)+
move.w d0,(a0)+
dbra d1,@b
*═▐╕└é≡Åëè·ë╗
*-------------------------------
*î│═▐╕└é≡ĵô╛
*---------------------
move.w #$4c,-(sp)
DOS _INTVCG
addq.l #2,sp
lea.l int4c_bak(pc),a0
move.l d0,(a0)
*═▐╕└é≡Åæé½æ╓éª
*---------------------
pea int4c(pc)
move.w #$4c,-(sp)
DOS _INTVCS
addq.l #2+4,sp
*╧│╜Ä≤ÉM╖¼╫╕└ùLî°èäéΦì₧é▌Åêù¥ôαé⌐éτ║░┘é│éΩéΘ═▐╕└é╠êΩé┬é≡ŵé┴ĵéΘ
*--------------------------------------------
lea.l mouse_sub_bak(pc),a0
move.l $934.w,(a0)
lea.l mouse_int(pc),a0
move.l a0,$934.w
rts
******************************************************************************
*
* âxâNâ^ò£ïA
*
******************************************************************************
.xdef Restore_vector
Restore_vector
move.l int4c_bak(pc),d0
beq Restore_vector_4c_end ═▐╕└╠»╕é╡é─éóé╚éó
move.l d0,-(sp)
move.w #$4c,-(sp)
DOS _INTVCS
addq.l #2+4,sp
Restore_vector_4c_end
move.l mouse_sub_bak(pc),d0
beq Restore_vector_mouse_end ═▐╕└╠»╕é╡é─éóé╚éó
move.l d0,$934.w
Restore_vector_mouse_end
rts
*******************************************************
*
* Ctrl-Cé▄é╜é═Åêù¥é≡ÆåÆfé│éΩé╜ÅΩìçé╠Åêù¥
*
* input none
* output none
* break d0.l,d1.l
*******************************************************
abort_process
move.l work_adrs(pc),a6
bsr Restore_vector
bsr set_HOME_for_apli
clr.w -(sp)
DOS _KFLUSH
move.w #-1,(sp)
DOS _EXIT2
*******************************************************
*
* Key Buffer Full èäéΦì₧é▌Åêù¥
*
* input none
* output none
* break none
*******************************************************
int4c
movem.l d0/a0/a6,-(sp)
move.l work_adrs(pc),a6
lea.l Key_work(a6),a0
moveq.l #0,d0
move.b $e8802f,d0
pea.l int4c_end(pc)
add.b d0,d0
bcc keyon_sub ╖░╡▌Åêù¥
bra keyoff_sub
int4c_end
movem.l (sp)+,d0/a0/a6
move.l int4c_bak(pc),-(sp)
rts
*----------------------------
*╖░╡▌Åêù¥
* d0.w ╖░╜╖¼▌║░─▐*2
*----------------------------
keyon_sub
add.l d0,a0
add.w d0,d0
add.l d0,a0
cmp.w #$ffff,(a0)
bne @f ╖░╡▌Æå
*TV ctrl╖░é¬ô»Ä₧ëƒé╡é╠╖░╡▌é═üAû│Äï
*----------------------
btst.b #3,Sys_flag3(a6)
bne keyon_sub_set_time TV ctrl╖░éαê┌ô«ìéæ¼ë╗╖░é╞é╡é─ï¡ÉºÄgùp
cmp.w #$ffff,Key_work+K_Shift*6(a6)
bne @f Shifté¬ëƒé│éΩé─éóéΘ
btst.b #0,$ed0027
bne keyon_sub_set_time Opt.2é═TVctrl╖░é┼é═é╚éó
cmp.w #$ffff,Key_work+K_Opt2*6(a6)
bne @f Opt2é¬ëƒé│éΩé─éóéΘ
*╖░╡▌èJÄnÄ₧è╘é≡É▌ÆΦ
*------------------------
keyon_sub_set_time
move.w $9cc.w,(a0)
clr.w 2(a0)
@@
rts
*----------------------------
*╖░╡╠Åêù¥
* d0.w ╖░╜╖¼▌║░─▐*2
*----------------------------
keyoff_sub
add.l d0,a0
add.w d0,d0
add.l d0,a0
move.w (a0),d0
cmp.w #$ffff,d0
beq keyoff_sub_end é╖é┼é╔╖░╡╠é╔é╚é┴é─éóéΘ
*╖░╡╠Ä₧è╘é≡îvÄZ
*----------------------
sub.w $9cc.w,d0
bcc @f ╡░╩▐░╠█░é╡é─éóé╚éó
add.w $9ca.w,d0
@@
add.w d0,d0
*╪╦▀░─Æåé╠ÅΩìçüA╖░╡╠é▄é┼é╠Ä₧è╘é≡╖░╡▌Ä₧è╘é╔ë┴ÄZ
*----------------------
cmp.w #$fffe,2(a0)
beq keyoff_sub_1 ╪╦▀░─èJÄnæ╥é┐é╛é┴é╜
bhi @f ╪╦▀░─Æå
*╖░╡▌é⌐éτ╖░╡╠é▄é┼üA╖░╡▌Ä₧è╘é≡ô╟é▄éΩé╚é⌐é┴é╜ÅΩìçé╠Åêù¥
*--------------------
sub.w #20*2,d0
bhi @f
moveq.l #1,d0
@@
add.w d0,4(a0) ╖░╪╦▀░─èJÄné⌐éτ╖░╡╠é▄é┼é╠Ä₧è╘é≡ë┴ÄZ
keyoff_sub_1
move.w #$ffff,(a0) ╖░╡╠Æå╠╫╕▐É▌ÆΦ
keyoff_sub_end
rts
*******************************************************
*
* MouseÄ≤ÉM╖¼╫╕└èäéΦì₧é▌Åêù¥ôαé⌐éτ║░┘é│éΩéΘ═▐╕└é╠ôαé╠
* êΩé┬é╠Åêù¥
*
* input a1.l ╧│╜├▐░└é╠▒─▐┌╜
* output none
* break none
*******************************************************
mouse_int
movem.l d0/a0/a6,-(sp)
move.l work_adrs(pc),a6
*ì╢╬▐└▌é╠Åêù¥
*----------------------------
lea.l Mouse_work(a6),a0
moveq.l #0*2,d0
pea.l mouse_int_left_end(pc) û▀éΦ▒─▐┌╜
btst.b #1,(a1)
bnz keyon_sub ╖░╡▌Åêù¥
bra keyoff_sub
mouse_int_left_end
*ëE╬▐└▌é╠Åêù¥
*----------------------------
lea.l Mouse_work(a6),a0
moveq.l #1*2,d0
pea.l mouse_int_right_end(pc) û▀éΦ▒─▐┌╜
btst.b #0,(a1)
bnz keyon_sub ╖░╡▌Åêù¥
bra keyoff_sub
mouse_int_right_end
movem.l (sp)+,d0/a0/a6
move.l mouse_sub_bak(pc),a0
jmp (a0)
******************************************************************************
*
* homeê╩Æué≡Åπê╩âAâvâèùpé╔É▌ÆΦ
*
* ôⁿù═ d2.w X
* d3.w Y
*
******************************************************************************
.xdef set_HOME_wait
set_HOME_wait
*ïAÉⁿè·è╘æ╥é┐
*---------------------
@@
btst.b #4,$e88001
beq @b
@@
btst.b #4,$e88001
bnz @b
.xdef set_HOME
set_HOME
move.w d2,Home_X(a6)
move.w d3,Home_Y(a6)
moveq.l #$00,d1
IOCS _HOME
rts
.xdef set_HOME_for_apli
set_HOME_for_apli
move.w Home_X(a6),d2
move.w Home_Y(a6),d3
moveq.l #$00,d1
IOCS _SCROLL
moveq.l #$01,d1
IOCS _SCROLL
moveq.l #$02,d1
IOCS _SCROLL
moveq.l #$03,d1
IOCS _SCROLL
rts
******************************************************************************
*
* ëµæ£é╠homeê╩Æué≡(0,0)é╔ò╧ìX
*
* ôⁿù═ Home_X(a6)
* Home_Y(a6)
* Åoù═ û│é╡
* öjë≤
******************************************************************************
.xdef pic_home_adjust
pic_home_adjust
btst.b #5,Sys_flag3(a6)
beq pic_home_adjust_end òΓÉ│ùvïüû│é╡
move Home_Y(a6),d1
move Home_X(a6),d0
move.w d0,d2
or.w d1,d2
beq pic_home_adjust_end é╖é┼é╔Homeê╩Æué═(0,0)é┼éáéΘ
movem.w d0/d1,-(sp)
moveq.l #0,d2
moveq.l #0,d3
bsr set_HOME
movem.w (sp)+,d0/d1
move.w #512,d7
moveq.l #0,d4
bra pic_home_adjust_start
pic_home_adjust_loop
cmp.w d3,d4
bne 1f
lea.l em_free_adrs(a6),a0
move.l #512/8-1,d2
@@
move.l (a0)+,(a1)+
move.l (a0)+,(a1)+
move.l (a0)+,(a1)+
move.l (a0)+,(a1)+
dbra.w d2,@b
addq.w #1,d4
and.w #$1ff,d4
pic_home_adjust_start
move.w d4,d3
lea.l em_free_adrs(a6),a0
1
lea.l $c00000,a1
moveq.l #0,d2
move.w d3,d2
lsl.l #8,d2
lsl.l #2,d2
add.l d2,a1
bsr get_VRAM_adjust_X
pic_home_adjust_next
add.w d1,d3
and.w #$1ff,d3
move.l a1,a0
dbra.w d7,pic_home_adjust_loop
pic_home_adjust_end
rts
*******************************
*VRAMô╟é▌ì₧é▌
*
* ôⁿù═ d0 Xé╠Homeê╩Æu
* a0 ĵéΦì₧é▌╩▐»╠º▒─▐┌╜
* a1 VRAM▒─▐┌╜
* Åoù═ é╚é╡
* öjë≤ d2,a0,a2
*******************************
get_VRAM_adjust_X
*ëEæñĵéΦì₧é▌
*------------------------
movea.l a1,a2
add.w d0,a2
add.w d0,a2
move.w #512,d2
sub.w d0,d2
*█▌╕▐▄░─▐é┼ô]æùé╡é╜ù]éΦ
*-------------------
lsr.w d2
bcc @f ô]æù─▐»─Éöé═ï⌠Éö
move.w (a2)+,(a0)+
@@
*█▌╕▐▄░─▐*2é┼ô]æùé╡é╜ù]éΦ
*-------------------
lsr.w d2
bcc @f ô]æù─▐»─Éöé═éSé╠ö{Éö
move.l (a2)+,(a0)+
@@
*█▌╕▐▄░─▐*2é┼ô]æù
*-----------------
subq.w #1,d2
bcs 1f
@@ move.l (a2)+,(a0)+
move.l (a2)+,(a0)+
dbra.w d2,@b
1
*ì╢æñĵéΦì₧é▌
*------------------------
movea.l a1,a2
move.w d0,d2
beq get_VRAM_adjust_X_end
*█▌╕▐▄░─▐é┼ô]æùé╡é╜ù]éΦ
*-------------------
lsr.w d2
bcc @f ô]æù─▐»─Éöé═ï⌠Éö
move.w (a2)+,(a0)+
@@
*█▌╕▐▄░─▐*2é┼ô]æùé╡é╜ù]éΦ
*-------------------
lsr.w d2
bcc @f ô]æù─▐»─Éöé═4é╠ö{Éö
move.l (a2)+,(a0)+
@@
*█▌╕▐▄░─▐*2é┼ô]æù
*-----------------
subq.w #1,d2
bcs get_VRAM_adjust_X_end
@@ move.l (a2)+,(a0)+
move.l (a2)+,(a0)+
dbra.w d2,@b
get_VRAM_adjust_X_end
rts
******************************************************************************
*
* square.s
*
******************************************************************************
Square
moveq.l #$16,d1
move.l #$E80029,a1
iocs _B_BPOKE
moveq.l #$0e,d1
lea.l $e80003-$e80029-1(a1),a1
iocs _B_BPOKE
moveq.l #$2c,d1
addq.l #$E80005-$e80003-1,a1
iocs _B_BPOKE
moveq.l #$6c,d1
addq.l #$E80007-$e80005-1,a1
iocs _B_BPOKE
move.w #$0089,d1
subq.l #$e80007+1-$E80000,a1
iocs _B_WPOKE
rts
******************************************************************************
* âeâLâXâgëµû╩é≡âNâèâAé╖éΘ
******************************************************************************
cls_text
move.w #2,-(sp)
move.w #10,-(sp)
DOS _CONCTRL
addq.l #4,sp
rts
******************************************************************************
*
* âeâôâ|âëâèâtâ@âCâïé≡ò┬é╢é─ìφÅ£é╖éΘ
*
******************************************************************************
.xdef close_temp
close_temp
bclr.b #2,Sys_flag(a6)
beq @f
move.w temp_handle(a6),-(sp)
dos _CLOSE
pea.l temp_path(a6)
dos _DELETE
addq.l #4+2,sp
@@
rts
*
.end